package com.hbpa.pan.server.modules.user.po;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author: BlcakTiger
 * @date: 2023/10/25 10:22
 * @contact: hsf6661@163.com
 * @description: 校验密保答案PO
 */
@ApiModel(value = "用户忘记密码-密保答案校验参数")
@Data
public class CheckAnswerPO implements Serializable {

    private static final long serialVersionUID = 7352003320751501633L;

    @ApiModelProperty(value = "用户名",required = true)
    @NotBlank(message = "用户名不能为空")
    @Pattern(regexp = "^[0-9A-Za-z]{6,16}$",message = "请输入6-16位只包含数字和字母的用户名")
    private String username;

    @ApiModelProperty(value = "密保问题",required = true)
    @NotBlank(message = "密保问题不能为空")
    @Length(max = 100,message = "密保问题不能超过100个字符")
    private String question;

    @ApiModelProperty(value = "密保答案",required = true)
    @NotBlank(message = "密保答案不能为空")
    @Length(max = 100,message = "密保答案不能超过100个字符")
    private String answer;
}
